package com.petsdar.pojo;

import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA
 * User: heroC
 * Date: 2020/6/27
 * Time: 18:40
 * Description: 权限类
 * Version: V1.0
 */

@Component
public class Power implements Serializable {
    private static final long serialVersionUID = 62718401130L;
    /** 权限ID */
    private String prId;
    /** 权限内容 */
    private boolean add;
    private boolean del;
    private boolean update;
    private boolean query;
    private boolean shopUpdate;
    private boolean shopQuery;
    /** 权限信息创建时间 */
    private Date prCreateTime;
    /** 权限信息更新时间 */
    private Date prUpdateTime;

    public Power() {
    }

    public Power(String prId,
                 boolean add,
                 boolean del,
                 boolean update,
                 boolean query,
                 boolean shopUpdate,
                 boolean shopQuery,
                 Date prCreateTime,
                 Date prUpdateTime) {
        this.prId = prId;
        this.add = add;
        this.del = del;
        this.update = update;
        this.query = query;
        this.shopUpdate = shopUpdate;
        this.shopQuery = shopQuery;
        this.prCreateTime = prCreateTime;
        this.prUpdateTime = prUpdateTime;
    }

    public Power(boolean add,
                 boolean del,
                 boolean update,
                 boolean query,
                 boolean shopUpdate,
                 boolean shopQuery,
                 Date prCreateTime,
                 Date prUpdateTime) {
        this.add = add;
        this.del = del;
        this.update = update;
        this.query = query;
        this.shopUpdate = shopUpdate;
        this.shopQuery = shopQuery;
        this.prCreateTime = prCreateTime;
        this.prUpdateTime = prUpdateTime;
    }

    public Power(String prId,
                 boolean add,
                 boolean del,
                 boolean update,
                 boolean query,
                 boolean shopUpdate,
                 boolean shopQuery,
                 Date prUpdateTime) {
        this.prId = prId;
        this.add = add;
        this.del = del;
        this.update = update;
        this.query = query;
        this.shopUpdate = shopUpdate;
        this.shopQuery = shopQuery;
        this.prUpdateTime = prUpdateTime;
    }

    public String getPrId() {
        return prId;
    }

    public void setPrId(String prId) {
        this.prId = prId;
    }

    public boolean isAdd() {
        return add;
    }

    public void setAdd(boolean add) {
        this.add = add;
    }

    public boolean isDel() {
        return del;
    }

    public boolean isShopUpdate() {
        return shopUpdate;
    }

    public void setShopUpdate(boolean shopUpdate) {
        this.shopUpdate = shopUpdate;
    }

    public boolean isShopQuery() {
        return shopQuery;
    }

    public void setShopQuery(boolean shopQuery) {
        this.shopQuery = shopQuery;
    }

    public void setDel(boolean del) {
        this.del = del;
    }

    public boolean isUpdate() {
        return update;
    }

    public void setUpdate(boolean update) {
        this.update = update;
    }

    public boolean isQuery() {
        return query;
    }

    public void setQuery(boolean query) {
        this.query = query;
    }

    public Date getPrCreateTime() {
        return prCreateTime;
    }

    public void setPrCreateTime(Date prCreateTime) {
        this.prCreateTime = prCreateTime;
    }

    public Date getPrUpdateTime() {
        return prUpdateTime;
    }

    public void setPrUpdateTime(Date prUpdateTime) {
        this.prUpdateTime = prUpdateTime;
    }

    @Override
    public String toString() {
        return "Power{" +
                "prId='" + prId + '\'' +
                ", add=" + add +
                ", del=" + del +
                ", update=" + update +
                ", query=" + query +
                ", shopUpdate=" + shopUpdate +
                ", shopQuery=" + shopQuery +
                ", prCreateTime=" + prCreateTime +
                ", prUpdateTime=" + prUpdateTime +
                '}';
    }
}
